package com.entity;

import javax.persistence.*;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;
import java.util.Date;

/**
 * 【养老院】 老人信息
 */

@Entity
@Table(name = "elder_info")
@Getter @Setter @NoArgsConstructor
public class ElderInfo extends BaseEntity {


    private String elderName;

    private Integer age;

    private String gender;

    private String healthStatus;

    private String idCard;

    private String contactPhone;

    private String emergencyContact;

    private String emergencyPhone;

    //入院日期
    @Column(name = "check_in_date")
    @Temporal(TemporalType.DATE)
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date checkInDate;

    //出院日期
    @Column(name = "check_out_date")
    @Temporal(TemporalType.DATE)
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date checkOutDate;

    @Column(name = "status", columnDefinition = "TINYINT default 1")
    private Integer status = 1; // 1-在院 0-出院

    //出院原因
    @Column(name = "discharge_reason")
    private String dischargeReason;

}